import 'package:convergence_media/utils/fast_hash.dart';
import 'package:freezed_annotation/freezed_annotation.dart';
import 'package:isar/isar.dart';

part 'token_model.g.dart';
part 'token_model.freezed.dart';

@freezed
@Collection(ignore: {'copyWith'})
class TokenModel with _$TokenModel {
  const factory TokenModel({
    required String phoneNumber,
    String? mainToken,
    String? circleToken,
    String? newsToken,
  }) = _TokenModel;

  const TokenModel._();

  Id get id => fastHash(phoneNumber);
}
